﻿// code06010000.cpp : 函数基础
// 函数

#include <iostream>
using namespace std;

int fact(int val)
{
	int result=1;
	while (val>0)
	{
		result *= val;
		--val;
	}
	return result;
}

int main()
{
	int j = fact(5);
	cout << "5!=" << j << endl;
	return 0;
}

